package cn.gson.crm.control.position;

import java.sql.SQLException;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.gson.crm.control.base.BaseServlet;
import cn.gson.crm.model.dao.PositionDao;

/**
 * Servlet implementation class DeleteJobServlet
 */
@WebServlet("/deletejob")
public class DeleteJobServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;
    private PositionDao pd=new PositionDao();
	

	@Override
	protected void get(HttpServletRequest request, HttpServletResponse response) throws Exception {
    	String[] ids = request.getParameterValues("id");
		try {
			for (String id : ids) {
				pd.deleteJobById(id);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
		response.sendRedirect("job");
    }}
